﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmApiLibrary.libs;
using SmApiLibrary.datatypes.Interface;

namespace SmApiLibrary.datatypes.AbstarctFactory
{
    /// <summary>
    /// 创建数据类型的抽象工场
    /// </summary>
    public abstract  class DataTypeABF
    {
        public DataTypeABF()
        { }

        public static DataTypeABF CreateFactory(WeiBoType weiboType)
        {
            DataTypeABF abf = null;
            switch (weiboType)
            { 
                case WeiBoType.Sina:
                    abf = new SinaDataTypeFactory();
                    break;
                case WeiBoType.QQ:
                    abf = new QQDataTypeFactory();
                    break;
                default:
                    abf = new SinaDataTypeFactory();
                    break;
            }
            return abf;
        }

        public abstract IComment CreateComment();
        public abstract ICount CreateCount();
        public abstract IDirectMessage CreateDirectMessage();
        public abstract IGeo CreateGeo();
        public abstract ISource CreateSource();
        public abstract ISourceUrl CreateSourceUrl();
        public abstract IStatus CreateStatus();
        public abstract ITag CreateTag();
        public abstract ITrend CreateTrend();
        public abstract IUser CreateUser();
    }
}
